package com.lrm.dao;

import com.lrm.pojo.Type;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * @Author: 王金海
 * @Description:
 * @Date: Created by Administrator on 2017/11/30.
 * @Modified By:
 */
public interface TypeJPA extends JpaRepository<Type,Long>,JpaSpecificationExecutor {

    Type findByName(String name);

    @Query("select t from Type t")
    List<Type> listType(Pageable pageable);
}
